package spring;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Created by kassadin@foxmail.com on 2017/4/27 0027.
 */
public class Spitter {
    private Long id;

    @NotNull
    @Size(min = 5,max = 16)
    private String username;

    @NotNull
    @Size(min = 5,max = 16)
    private String password;

    public Spitter() {
    }

    public Spitter(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public Spitter(Long id, String username, String password) {
        this.id = id;
        this.username = username;
        this.password = password;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "Spitter{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
